package com.example.base.security.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author xiong
 * @since 2024-02-05
 */

@Data
@ApiModel(description = "部门表")
@TableName("sys_dept")
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

        /**
    * 主键id
    */
    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Integer id;
    /**
    * 部门名称
    */
    @ApiModelProperty(value = "部门名称")
    private String deptName;
    /**
    * 部门编号
    */
    @ApiModelProperty(value = "部门编号")
    private String deptNo;
    /**
    * 父部门编号
    */
    @ApiModelProperty(value = "父部门编号")
    private Integer deptPid;
    /**
    * 部门管理员角色
    */
    @ApiModelProperty(value = "部门管理员角色")
    private String deptAdminRole;
    /**
    * 部门管理次要角色
    */
    @ApiModelProperty(value = "部门管理次要角色")
    private String deptAdminExtRole;
    /**
    * 创建时间
    */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createtime;

    @ApiModelProperty(value = "排序")
    private Integer sortNum;

    @ApiModelProperty("是否启用")
    private Boolean isEnabled;

    @ApiModelProperty(value = "部门备注")
    private String deptNote;

    @TableField(exist = false)
    private List<SysDept> children;

}
